Global Index
HTML5 JS API Index > Typed Arrays Tutorials & Specs

Uint8ClampedArray

Implements ArrayBufferView.

Uint8ClampedArray is defined in order to replace CanvasPixelArray. It behaves identically to the other typed array views, except that the setters and constructor use clamping [WEBIDL] rather than modulo arithmetic when converting incoming number values.

Properties
const longBYTES_PER_ELEMENT = 1
ArrayBufferbuffer
unsigned longbyteLength
unsigned longbyteOffset
unsigned longlength
Constructor
Uint8ClampedArray(unsigned long length)
Uint8ClampedArray(Uint8ClampedArray array)
Uint8ClampedArray(octet[] array)
Uint8ClampedArray(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length)
Operations
octetget(unsigned long index)
voidset(any index_array, optional any value_offset)
Uint8ClampedArraysubarray(long start, long end)
Referenced by
ImageDatadata